# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=arjun
pkgver=2.2.7.r5.gd1fb995
pkgrel=1
epoch=1
pkgdesc='HTTP parameter discovery suite.'
groups=('blackarch' 'blackarch-scanner' 'blackarch-webapp')
arch=('any')
url='https://github.com/s0md3v/Arjun'
license=('GPL3')
depends=('python' 'python-requests' 'python-dicttoxml' 'python-ratelimit')
makedepends=('git' 'python-setuptools')
source=("$pkgname::git+https://github.com/s0md3v/Arjun.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  ( set -o pipefail
    git describe --long --tags --abbrev=7 2>/dev/null |
      sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "%s.%s" "$(git rev-list --count HEAD)" \
      "$(git rev-parse --short=7 HEAD)"
  )
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md CHANGELOG.md
}

